import { ProCard } from '@ant-design/pro-components';
import { Select, Button, Form, DatePicker } from 'antd';
const { Option } = Select;



const onFinish = (values: any) => {
    console.log('Success:', values);
};

const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
};

const onChange: DatePickerProps['onChange'] = (date, dateString) => {
    console.log(date, dateString);
};

const YearAnalysis: React.FC = () => {
    return (
        <div>
            <ProCard bordered>
                <Form
                    layout='inline'
                    name="basic"

                    initialValues={{ remember: true }}
                    onFinish={onFinish}
                    onFinishFailed={onFinishFailed}
                >
                    <Form.Item label="选择年份" name='year'>
                        <DatePicker picker="year" format='YYYY'/>
                    </Form.Item>

                    <Form.Item
                        name="payType"
                        label="支付平台"
                    >
                        <Select placeholder="请选择支付平台">
                            <Option value={1}>支付宝</Option>
                            <Option value={2}>微信</Option>
                        </Select>
                    </Form.Item>

                    <Form.Item>
                        <Button type="primary" htmlType="submit">
                            Submit
                        </Button>
                    </Form.Item>
                </Form>
            </ProCard>

        </div>
    )
}

export default YearAnalysis;